<template>
    <div class="css">
        <h3>css</h3>
        <div>
            <span class="vertical">垂直居中</span>
        </div>
        <div>
            <span class="border-bottom-1px">1px边框</span>
            <span class="fit-border-1px border-1px">1px适配</span>
            <span class="border-radius">边框圆角</span>  <hr>
            <span class="border-radius1 fit-border-radius">适配边框圆角</span>
        </div>  
    </div>
</template>
<script>
    export default{

    }
</script>
<style lang="scss">
    .css{
        font-size: 24px;
        span{
            display: block;
        }
    }
    .vertical{
        display: block;
        height: 50px;
        line-height: 50px;
        border:1px solid red;
    }
    .border-bottom-1px{
        display: block;
        border-bottom: 1px solid tan;
    }
    .fit-border-1px{
        position:relative;
        margin: 5px;
        display: block;
    }
    .fit-border-1px::after{
        content: '';
        display:block;
        width:100%;
        height:1px;
        background: tan;
        position:absolute;
        left:0;
        bottom:0;
    }
    .border-radius{
        border: 1px solid teal;
    }
    .border-radius1{
        position: relative;
        &::after{
            border-radius: 10px;
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio: 3){
        .border-1px::after{
            -webkit-transform: scaleY(.33);
            transform: scaleY(.33);
        }
        .fit-border-radius::after{
            position: absolute;
            top:0;
            left:0;
            content: '';
            width: 300%;
            height: 300%;
            border: 1px solid teal;
            -webkit-transform-origin:top left;
            transform-origin:top left;
            -webkit-transform: scale(.33, .33);
            transform: scale(.33, .33);
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        .border-1px::after{
            -webkit-transform: scaleY(.5);
            transform: scaleY(.5);
        }
        .fit-border-radius::after{
            position: absolute;
            top:0;
            left:0;
            content: '';
            width: 200%;
            height: 200%;
            border: 1px solid teal;
            -webkit-transform: scale(.5, .5);
            transform: scale(.5, .5);
            -webkit-transform-origin:top left;
            transform-origin:top left;
        }
    }
  
</style>